{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 输入和输出"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "please enter your name: Ivan\n",
      "hello, Ivan\n"
     ]
    }
   ],
   "source": [
    "name = input('please enter your name: ')\n",
    "print('hello,', name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 打印一下变量的值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "123 456.789 Hello, world Hello, 'Adam' Hello, \"Bart\" Hello,\n",
      "Lisa!\n"
     ]
    }
   ],
   "source": [
    "n = 123\n",
    "f = 456.789\n",
    "s1 = 'Hello, world'\n",
    "s2 = 'Hello, \\'Adam\\''\n",
    "s3 = r'Hello, \"Bart\"'\n",
    "s4 = r'''Hello,\n",
    "Lisa!'''\n",
    "print(n,\n",
    "f,\n",
    "s1,\n",
    "s2,\n",
    "s3,\n",
    "s4)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "123\n",
      "456.789\n",
      "Hello, world\n",
      "Hello, 'Adam'\n",
      "Hello, \"Bart\"\n",
      "Hello,\n",
      "Lisa!\n"
     ]
    }
   ],
   "source": [
    "# 打印一个值后换行打印下一个值\n",
    "n = 123\n",
    "f = 456.789\n",
    "s1 = 'Hello, world'\n",
    "s2 = 'Hello, \\'Adam\\''\n",
    "s3 = r'Hello, \"Bart\"'\n",
    "s4 = r'''Hello,\n",
    "Lisa!'''\n",
    "print(n)\n",
    "print(f)\n",
    "print(s1)\n",
    "print(s2)\n",
    "print(s3)\n",
    "print(s4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
